import random


def scpk():
    # 生成扑克
    colour = ["♠", "♥", "♦", "♣"]
    pai = list(str(i) for i in range(2, 11))+['A', 'J', 'Q', 'K']
    puke = ['大王', '小王']
    for i in colour:
        for j in pai:
            puke.append(i+j)
    return puke


def xipai():
    # 随机洗牌
    res = []
    t = scpk()
    while len(t) > 0:
        res.append(t.pop(random.randint(0, len(t)-1)))
    return res


def fapai():
    # 发牌
    t = xipai()
    diyi = t[::3]
    dier = t[1::3]
    disan = t[2::3]
    return diyi,dier,disan
